package org.student.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.student.dao.IScoreDao;
import org.student.entity.StuSys_Score;
import org.student.entity.StuSys_Teacher;

/**
 * 项目名称:学生管理系统
 * 类名称：IScoreService
 * 类描述：成绩业务类
 * 创建人:郭坚生
 * 描述:
 * 创建时间:2011-9-24 下午03:57:20
 */
@Component("IScoreService")
public class IScoreService implements IScoreDao {

	private IScoreDao iso;
	
	public IScoreDao getIso() {
		return iso;
	}
	@Resource(name="IScoreDaoImpl")
	public void setIso(IScoreDao iso) {
		this.iso = iso;
	}
	/**
	 *  插入成绩
	 */
	@Override
	public boolean insertScore(StuSys_Score sco) throws Exception {
		
		return this.iso.insertScore(sco);
	}
	/**
	 *  根据课程名称查询
	 */
	@Override
	public List<StuSys_Score> getScoresByName(String name) throws Exception {
		
		return this.iso.getScoresByName(name);
	}
	/**
	 *  通过学生姓名查找分数
	 */
	@Override
	public List<StuSys_Score> getScoreByStudentName(String stuName)
			throws Exception {
		// TODO Auto-generated method stub
		return  this.iso.getScoreByStudentName(stuName);
	}
	/**
	 *  通过学生ID查找分数
	 */
	@Override
	public List<StuSys_Score> getScoreByStudentId(int id) throws Exception {
		// TODO Auto-generated method stub
		return this.iso.getScoreByStudentId(id);
	}
	/** 
	 * 根据ID删除成绩
	 */
	@Override
	public void deleteScore(int id) throws Exception {
		
		this.iso.deleteScore(id);
	}
	/** 
	 *修改成绩
	 */
	@Override
	public void updateScore(StuSys_Score sco) throws Exception {
		this.iso.updateScore(sco);
	}
	
	/**
	 * 查询所有成绩
	 */
	
	@Override
	public List<StuSys_Score> getAllScore() throws Exception {
		return this.iso.getAllScore();
	}
	/** 
	 * 通过ID查找成绩
	 */
	@Override
	public List<StuSys_Score> getScoreById(String id) throws Exception {
		return this.iso.getScoreById(id);
	}
	
}
